3.63 \(\int \frac{(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx\)

Optimal. Leaf size=108 \[ \frac{c^2 (A-4 B) \cos (e+f x)}{a^2 f}-\frac{a^2 c^2 (A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}+\frac{c^2 x (A-4 B)}{a^2}+\frac{2 c^2 (A-4 B) \cos ^3(e+f x)}{3 f (a \sin (e+f x)+a)^2} \]

[Out]

((A - 4*B)*c^2*x)/a^2 + ((A - 4*B)*c^2*Cos[e + f*x])/(a^2*f) - (a^2*(A - B)*c^2*Cos[e + f*x]^5)/(3*f*(a + a*Si
n[e + f*x])^4) + (2*(A - 4*B)*c^2*Cos[e + f*x]^3)/(3*f*(a + a*Sin[e + f*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.276867, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.139, Rules used = {2967, 2859, 2680, 2682, 8} \[ \frac{c^2 (A-4 B) \cos (e+f x)}{a^2 f}-\frac{a^2 c^2 (A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}+\frac{c^2 x (A-4 B)}{a^2}+\frac{2 c^2 (A-4 B) \cos ^3(e+f x)}{3 f (a \sin (e+f x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x])^2,x]

[Out]

((A - 4*B)*c^2*x)/a^2 + ((A - 4*B)*c^2*Cos[e + f*x])/(a^2*f) - (a^2*(A - B)*c^2*Cos[e + f*x]^5)/(3*f*(a + a*Si
n[e + f*x])^4) + (2*(A - 4*B)*c^2*Cos[e + f*x]^3)/(3*f*(a + a*Sin[e + f*x])^2)

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2859

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*(2*m +
p + 1)), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rule 2680

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(2*g*(
g*Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(2*m + p + 1)), x] + Dist[(g^2*(p - 1))/(b^2*(2*m +
 p + 1)), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rule 2682

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(g*(g*Cos[e
 + f*x])^(p - 1))/(b*f*(p - 1)), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx &=\left (a^2 c^2\right ) \int \frac{\cos ^4(e+f x) (A+B \sin (e+f x))}{(a+a \sin (e+f x))^4} \, dx\\ &=-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{3 f (a+a \sin (e+f x))^4}-\frac{1}{3} \left (a (A-4 B) c^2\right ) \int \frac{\cos ^4(e+f x)}{(a+a \sin (e+f x))^3} \, dx\\ &=-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{3 f (a+a \sin (e+f x))^4}+\frac{2 (A-4 B) c^2 \cos ^3(e+f x)}{3 f (a+a \sin (e+f x))^2}+\frac{\left ((A-4 B) c^2\right ) \int \frac{\cos ^2(e+f x)}{a+a \sin (e+f x)} \, dx}{a}\\ &=\frac{(A-4 B) c^2 \cos (e+f x)}{a^2 f}-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{3 f (a+a \sin (e+f x))^4}+\frac{2 (A-4 B) c^2 \cos ^3(e+f x)}{3 f (a+a \sin (e+f x))^2}+\frac{\left ((A-4 B) c^2\right ) \int 1 \, dx}{a^2}\\ &=\frac{(A-4 B) c^2 x}{a^2}+\frac{(A-4 B) c^2 \cos (e+f x)}{a^2 f}-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{3 f (a+a \sin (e+f x))^4}+\frac{2 (A-4 B) c^2 \cos ^3(e+f x)}{3 f (a+a \sin (e+f x))^2}\\ \end{align*}

Mathematica [B]  time = 0.571783, size = 234, normalized size = 2.17 \[ \frac{(c-c \sin (e+f x))^2 \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \left (8 (A-B) \sin \left (\frac{1}{2} (e+f x)\right )+3 (A-4 B) (e+f x) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^3-8 (2 A-5 B) \sin \left (\frac{1}{2} (e+f x)\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2-4 (A-B) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )-3 B \cos (e+f x) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^3\right )}{3 a^2 f (\sin (e+f x)+1)^2 \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x])^2,x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(8*(A - B)*Sin[(e + f*x)/2] - 4*(A - B)*(Cos[(e + f*x)/2] + Sin[(e + f*
x)/2]) - 8*(2*A - 5*B)*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + 3*(A - 4*B)*(e + f*x)*(Cos[(
e + f*x)/2] + Sin[(e + f*x)/2])^3 - 3*B*Cos[e + f*x]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3)*(c - c*Sin[e + f
*x])^2)/(3*a^2*f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^4*(1 + Sin[e + f*x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.117, size = 198, normalized size = 1.8 \begin{align*} -2\,{\frac{B{c}^{2}}{{a}^{2}f \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) }}+2\,{\frac{{c}^{2}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) A}{{a}^{2}f}}-8\,{\frac{{c}^{2}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) B}{{a}^{2}f}}+8\,{\frac{A{c}^{2}}{{a}^{2}f \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}}}-8\,{\frac{B{c}^{2}}{{a}^{2}f \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}}}-{\frac{16\,A{c}^{2}}{3\,{a}^{2}f} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+{\frac{16\,B{c}^{2}}{3\,{a}^{2}f} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}-8\,{\frac{B{c}^{2}}{{a}^{2}f \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x)

[Out]

-2/f*c^2/a^2*B/(1+tan(1/2*f*x+1/2*e)^2)+2/f*c^2/a^2*arctan(tan(1/2*f*x+1/2*e))*A-8/f*c^2/a^2*arctan(tan(1/2*f*
x+1/2*e))*B+8/f*c^2/a^2/(tan(1/2*f*x+1/2*e)+1)^2*A-8/f*c^2/a^2/(tan(1/2*f*x+1/2*e)+1)^2*B-16/3/f*c^2/a^2/(tan(
1/2*f*x+1/2*e)+1)^3*A+16/3/f*c^2/a^2/(tan(1/2*f*x+1/2*e)+1)^3*B-8/f*c^2/a^2*B/(tan(1/2*f*x+1/2*e)+1)

________________________________________________________________________________________

Maxima [B]  time = 1.52802, size = 1125, normalized size = 10.42 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

-2/3*(2*B*c^2*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 11*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3
/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1
) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)
^4/(cos(f*x + e) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))
/a^2) - A*c^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*si
n(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) +
 1)^3) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) + 2*B*c^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(
f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(
f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) +
A*c^2*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a^2 + 3*a^2*sin(f*x + e
)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) -
2*A*c^2*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 1)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x +
 e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + B*c^2*(3*sin(f*x + e)/(cos(f*x + e) +
1) + 1)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x
 + e)^3/(cos(f*x + e) + 1)^3))/f

________________________________________________________________________________________

Fricas [B]  time = 1.70713, size = 568, normalized size = 5.26 \begin{align*} -\frac{3 \, B c^{2} \cos \left (f x + e\right )^{3} + 6 \,{\left (A - 4 \, B\right )} c^{2} f x - 4 \,{\left (A - B\right )} c^{2} -{\left (3 \,{\left (A - 4 \, B\right )} c^{2} f x -{\left (8 \, A - 23 \, B\right )} c^{2}\right )} \cos \left (f x + e\right )^{2} +{\left (3 \,{\left (A - 4 \, B\right )} c^{2} f x + 2 \,{\left (2 \, A - 11 \, B\right )} c^{2}\right )} \cos \left (f x + e\right ) +{\left (6 \,{\left (A - 4 \, B\right )} c^{2} f x - 3 \, B c^{2} \cos \left (f x + e\right )^{2} + 4 \,{\left (A - B\right )} c^{2} +{\left (3 \,{\left (A - 4 \, B\right )} c^{2} f x + 2 \,{\left (4 \, A - 13 \, B\right )} c^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{3 \,{\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f -{\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/3*(3*B*c^2*cos(f*x + e)^3 + 6*(A - 4*B)*c^2*f*x - 4*(A - B)*c^2 - (3*(A - 4*B)*c^2*f*x - (8*A - 23*B)*c^2)*
cos(f*x + e)^2 + (3*(A - 4*B)*c^2*f*x + 2*(2*A - 11*B)*c^2)*cos(f*x + e) + (6*(A - 4*B)*c^2*f*x - 3*B*c^2*cos(
f*x + e)^2 + 4*(A - B)*c^2 + (3*(A - 4*B)*c^2*f*x + 2*(4*A - 13*B)*c^2)*cos(f*x + e))*sin(f*x + e))/(a^2*f*cos
(f*x + e)^2 - a^2*f*cos(f*x + e) - 2*a^2*f - (a^2*f*cos(f*x + e) + 2*a^2*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [A]  time = 30.2976, size = 2474, normalized size = 22.91 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))**2/(a+a*sin(f*x+e))**2,x)

[Out]

Piecewise((3*A*c**2*f*x*tan(e/2 + f*x/2)**5/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*
a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 9*A*c**2*
f*x*tan(e/2 + f*x/2)**4/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x
/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 12*A*c**2*f*x*tan(e/2 + f*x/2
)**3/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*
tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 12*A*c**2*f*x*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(
e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2
 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 9*A*c**2*f*x*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**
2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f
*x/2) + 3*a**2*f) + 3*A*c**2*f*x/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(
e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 24*A*c**2*tan(e/2 +
f*x/2)**3/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a*
*2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 8*A*c**2*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(
e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2
 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 24*A*c**2*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f
*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/
2) + 3*a**2*f) + 8*A*c**2/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f
*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 12*B*c**2*f*x*tan(e/2 + f*x
/2)**5/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*
f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 36*B*c**2*f*x*tan(e/2 + f*x/2)**4/(3*a**2*f*ta
n(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)*
*2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 48*B*c**2*f*x*tan(e/2 + f*x/2)**3/(3*a**2*f*tan(e/2 + f*x/2)**5 +
 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e
/2 + f*x/2) + 3*a**2*f) - 48*B*c**2*f*x*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 +
 f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**
2*f) - 36*B*c**2*f*x*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f
*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 12*B*c**2*f*x/(
3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/
2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 24*B*c**2*tan(e/2 + f*x/2)**4/(3*a**2*f*tan(e/2 + f*x/
2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*
f*tan(e/2 + f*x/2) + 3*a**2*f) - 78*B*c**2*tan(e/2 + f*x/2)**3/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/
2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*
a**2*f) - 74*B*c**2*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2
*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 90*B*c**2*tan
(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 1
2*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 38*B*c**2/(3*a**2*f*tan(e/2 + f*x/2)**5
 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan
(e/2 + f*x/2) + 3*a**2*f), Ne(f, 0)), (x*(A + B*sin(e))*(-c*sin(e) + c)**2/(a*sin(e) + a)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.18346, size = 184, normalized size = 1.7 \begin{align*} \frac{\frac{3 \,{\left (A c^{2} - 4 \, B c^{2}\right )}{\left (f x + e\right )}}{a^{2}} - \frac{6 \, B c^{2}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1\right )} a^{2}} - \frac{8 \,{\left (3 \, B c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 3 \, A c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 9 \, B c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - A c^{2} + 4 \, B c^{2}\right )}}{a^{2}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}^{3}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="giac")

[Out]

1/3*(3*(A*c^2 - 4*B*c^2)*(f*x + e)/a^2 - 6*B*c^2/((tan(1/2*f*x + 1/2*e)^2 + 1)*a^2) - 8*(3*B*c^2*tan(1/2*f*x +
 1/2*e)^2 - 3*A*c^2*tan(1/2*f*x + 1/2*e) + 9*B*c^2*tan(1/2*f*x + 1/2*e) - A*c^2 + 4*B*c^2)/(a^2*(tan(1/2*f*x +
 1/2*e) + 1)^3))/f